package com.rabincorp.tactile.util;

import com.rabincorp.tactile.task.FeedUpdateCronJob;
import javax.servlet.ServletException;
import org.apache.struts.action.ActionServlet;
import org.apache.struts.action.PlugIn;
import org.apache.struts.config.ModuleConfig;

/**
 * @author irabin
 */
public final class ApplicationPlugIn implements PlugIn {

    public ApplicationPlugIn() {
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public void init(ActionServlet servlet, ModuleConfig config) throws ServletException {

        CacheService.getDefault();
        FeedUpdateCronJob.getInstance().refreshFeed();
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public void destroy() {
        // TODO
    }
}
